package com.ruoyi.common.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

import java.util.Objects;

@Getter
@AllArgsConstructor
public enum OrderType {
    Membership("1","充值会员"),
    Other("2","其他");

    private String value;
    private String name;

    public static OrderType valuesOf(String value) {
        //获取所有枚举集合
        OrderType[] es = values();
        for (OrderType e : es) {
            if (Objects.equals(e.getValue(), value)) {
                return e;
            }
        }
        return null;
    }
}
